<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
    * {
      margin: 0px;
      padding: 0px;
    }

    #box {
      width: 800px;
      height: 800px;
      position: relative;
      background-color: #3e3e3e;
    }

    #drag1 {
      width: 100px;
      height: 100px;
      background-color: #000;
      position: absolute;
      top: 50px;
      left: 100px;
    }

    .temp {
      width: 100px;
      height: 100px;
      background-color: sandybrown;
      opacity: 0.3;
    }

    #drag2 {
      width: 100px;
      height: 100px;
      background-color: #000;
      position: absolute;
      top: 50px;
      left: 250px;
    }
  </style>
</head>

<body>
  <div id="box">
    <div id="drag1"></div>
    <div id="drag2"></div>
  </div>
  <script>
    let box1 = document.getElementById("drag1").currentStyle
    console.log(box1)
    let box2 = document.getElementById("drag2")
    let b = box2.currentStyle
    console.log(b)
    let a = getComputedStyle(box2, null)["height"]
    console.log('a' + a)
    let box3 = document.getElementById("box")



  </script>
</body>

</html>